
<?

require_once ("application.list.inc");

global $_GLOBAL_DBH;
global $_OBJECT_IFACE_PANEL;

$indexes = array (
	last=>array (label=>"Last",order=>"DEFAULT",wrapper=>"vmc_icon_user"),
	first=>array (label=>"First",order=>"DEFAULT",wrapper=>"vmc_icon_profile"),
	email=>array (label=>"Email",order=>"DEFAULT",wrapper=>"vmc_icon_mail"),
	phone_1=>array (label=>"Phone",order=>"DEFAULT",wrapper=>"vmc_icon_phone"),
	city=>array (label=>"City",order=>"DEFAULT"),
	createdate=>array (label=>"Create Date",order=>"DEFAULT",wrapper=>"vmc_icon_date"),
);

$object_ctl = "/admin/projects/projects/fs_projects.php?fs_tab=users&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_users&fs_action=view&";
$link_options = "&fs_action=view&fs_tab=users&project_id={$_REQUEST["project_id"]}";
$list_options = array ();

$_OBJECT_IFACE_LIST = _app_create_list_object (array (
                db_conn=>$_GLOBAL_DBH,
                indexes=>$indexes,
		list_count=>"SELECT COUNT(users.id) FROM project_workgroups,user_workgroups_view,users WHERE project_workgroups.project_id={$_REQUEST["project_id"]} AND project_workgroups.workgroup_id=user_workgroups_view.workgroup_id AND user_id=users.id",
		list_count_rows=>true,
		list_select=>"SELECT users.*,profiles.phone_1,profiles.city FROM project_workgroups,user_workgroups_view,users,profiles WHERE project_workgroups.project_id={$_REQUEST["project_id"]} AND project_workgroups.workgroup_id=user_workgroups_view.workgroup_id AND user_id=users.id AND users.id=profiles.uid GROUP BY users.id",
                list_id=>"lc_project_users",
                list_options=>$list_options,
                primary_key=>"id",
                primary_relation=>"user_id",
                link_options=>$link_options,
                object_ctl=>$object_ctl
));

$_OBJECT_IFACE_TABBING_PANEL->insert_container ($_OBJECT_IFACE_LIST);

?>
